gtk4.git
7 years agoaccellabel: Add newline between consecutive if statements
Timm Bäder [Sat, 7 Jul 2018 21:03:19 +0000 (23:03 +0200)]
accellabel: Add newline between consecutive if statements

7 years agolistbox demo: Hide extra_buttons_box by default
Timm Bäder [Sat, 7 Jul 2018 17:34:00 +0000 (19:34 +0200)]
listbox demo: Hide extra_buttons_box by default

It should only show up when hovering the row.

7 years agorange: Remove has_origin flag
Timm Bäder [Sat, 7 Jul 2018 17:18:26 +0000 (19:18 +0200)]
range: Remove has_origin flag

It's equivalent to the highlight_widget being !NULL.

7 years agodialog: Remove priv pointer
Timm Bäder [Sat, 7 Jul 2018 17:14:38 +0000 (19:14 +0200)]
dialog: Remove priv pointer

7 years agodialog: Remove some GtkVBox references
Timm Bäder [Sat, 7 Jul 2018 17:10:58 +0000 (19:10 +0200)]
dialog: Remove some GtkVBox references

7 years agoGtkSeparatorToolItem: Remove draw flag
Timm Bäder [Sat, 7 Jul 2018 16:33:43 +0000 (18:33 +0200)]
GtkSeparatorToolItem: Remove draw flag

We can as well query the current value of the flag using
gtk_style_context_has_class.

7 years agoGtkSeparatorToolItem: Remove priv pointer
Timm Bäder [Sat, 7 Jul 2018 16:30:29 +0000 (18:30 +0200)]
GtkSeparatorToolItem: Remove priv pointer

7 years agoGtkApplication: Remove priv pointer
Timm Bäder [Sat, 7 Jul 2018 14:15:02 +0000 (16:15 +0200)]
GtkApplication: Remove priv pointer

7 years agocolorswatch: Remove priv pointer
Timm Bäder [Sat, 7 Jul 2018 14:08:21 +0000 (16:08 +0200)]
colorswatch: Remove priv pointer

7 years agorender: Remove gtk_render_slider
Timm Bäder [Sat, 7 Jul 2018 12:36:59 +0000 (14:36 +0200)]
render: Remove gtk_render_slider

The only thing it was doing is render background and frame, which you
get from using a widget for your slider anyway.

7 years agorenderborder: Remove some unused API
Timm Bäder [Sat, 7 Jul 2018 12:34:18 +0000 (14:34 +0200)]
renderborder: Remove some unused API

7 years agomain: Don't look at first GTK_DISPLAY_DEBUG_CHECK parameter...
Timm Bäder [Sat, 7 Jul 2018 09:37:24 +0000 (11:37 +0200)]
main: Don't look at first GTK_DISPLAY_DEBUG_CHECK parameter...

... if none of the debug displays have any debug flags set. This way, we
can ignore the first parameter to e.g. GTK_DISPLAY_NOTE, which is
usually a call to gtk_widget_get_display.

Before this patch, gtk_widget_get_display was the slowest part of
gtk_widget_query_size_for_orientation.

7 years agoFix a few documentation warnings
Timm Bäder [Thu, 5 Jul 2018 19:01:44 +0000 (21:01 +0200)]
Fix a few documentation warnings

7 years agoMerge branch 'gtk-picture-docs' into 'master'
Timm Bäder [Sat, 7 Jul 2018 06:30:37 +0000 (06:30 +0000)]
Merge branch 'gtk-picture-docs' into 'master'

docs: Add GtkPicture to types list

See merge request GNOME/gtk!233

7 years agodocs: Add GtkPicture to types list
Thomas Bechtold [Fri, 6 Jul 2018 20:14:26 +0000 (22:14 +0200)]
docs: Add GtkPicture to types list

We want signals, arguments/parameters and position in the hierarchy to
be shown in the documentation for GtkPicture. So fix the types list.

See
https://developer.gnome.org/gtk-doc-manual/unstable/metafiles_types.html.en

7 years agofixed: Remove child list
Timm Bäder [Thu, 5 Jul 2018 17:06:48 +0000 (19:06 +0200)]
fixed: Remove child list

Use the child widget list from GtkWidget and attach x/y positions via a
qdata.

7 years agoGtkLayout: Remove freeze_count member
Timm Bäder [Thu, 5 Jul 2018 16:01:12 +0000 (18:01 +0200)]
GtkLayout: Remove freeze_count member

Unused.

7 years agospinbutton: Keep GParamSpecs around
Timm Bäder [Tue, 3 Jul 2018 20:30:25 +0000 (22:30 +0200)]
spinbutton: Keep GParamSpecs around

notify_by_pspec is more efficient and this way the source file is more
in line with the others.

7 years agoci: Update the image for the Flatpak jobs
Emmanuele Bassi [Wed, 4 Jul 2018 17:32:59 +0000 (18:32 +0100)]
ci: Update the image for the Flatpak jobs

The gnome-nightly-oci registry was moved to gitlab.gnome.org, so we
need to change the image we use when building Flatpak bundles in our
CI pipeline.

7 years agoMerge branch '1140-gtk_printer_get_hard_margins_for_paper_size-is-not-external' into...
Emmanuele Bassi [Wed, 4 Jul 2018 16:55:34 +0000 (16:55 +0000)]
Merge branch '1140-gtk_printer_get_hard_margins_for_paper_size-is-not-external' into 'master'

Resolve "gtk_printer_get_hard_margins_for_paper_size() is not external"

Closes #1140

See merge request GNOME/gtk!229

7 years agogtkprinter: Make gtk_printer_get_hard_margins_for_paper_size() public
Kjell Ahlstedt [Wed, 4 Jul 2018 16:40:33 +0000 (18:40 +0200)]
gtkprinter: Make gtk_printer_get_hard_margins_for_paper_size() public

The declaration in gtkprinter.h shall be preceded by GDK_AVAILABLE_IN_ALL,
or else the function can't be used in application programs.

Closes #1140

7 years agorendernode: Make offset nodes use floats
Benjamin Otte [Wed, 4 Jul 2018 13:03:27 +0000 (15:03 +0200)]
rendernode: Make offset nodes use floats

It's OpenGL stuff, use floats.

7 years agogtkmediafile: Don't leak all the images
Benjamin Otte [Wed, 4 Jul 2018 12:40:13 +0000 (14:40 +0200)]
gtkmediafile: Don't leak all the images

We were leaking the GBytes for the image memory, which is a
noticeable memleak to anyone who's casually running a memory monitor.

Go KDE users!

Closes #1200

7 years agoiconhelper: Plug memleak
Benjamin Otte [Wed, 4 Jul 2018 12:40:00 +0000 (14:40 +0200)]
iconhelper: Plug memleak

7 years agomediafile: Check if media files are open when trying to play
Benjamin Otte [Sun, 1 Jul 2018 19:58:13 +0000 (21:58 +0200)]
mediafile: Check if media files are open when trying to play

If no file is open, refuse to play.

7 years agocss: Don't do indirections
Benjamin Otte [Tue, 3 Jul 2018 21:23:36 +0000 (23:23 +0200)]
css: Don't do indirections

We don't need to look up the property by name to query its ID when we
know the ID already because it's inside an enum.

7 years agocss: Report sizes as absolute
Benjamin Otte [Tue, 3 Jul 2018 21:17:41 +0000 (23:17 +0200)]
css: Report sizes as absolute

All PangoFontDescriptions that GTK creates now use
pango_font_description_set_absolute_size().

7 years agoimage: size request is always CONSTANT_SIZE
Benjamin Otte [Wed, 4 Jul 2018 03:12:53 +0000 (05:12 +0200)]
image: size request is always CONSTANT_SIZE

It's always -gtk-icon-size in both directions, even for paintables.
There's no width-for-height happening.

7 years agothemes: Restore default progressbar min sizes
Daniel Boles [Tue, 3 Jul 2018 17:55:31 +0000 (18:55 +0100)]
themes: Restore default progressbar min sizes

The min size on the oriented axis used to come from style props with
default values in the source file, used if the theme did not provide a
min size in CSS. When the style props were removed, so was any notion of
a minimal size for proressbars' main axis, meaning that now progressbars
without expand or any other source of min size were just tiny specks.

The right place to do that was always the theme, so in our themes now,
fix that by copying the old default values for the style properties; see:

https://gitlab.gnome.org/GNOME/gtk/issues/1191#note_259393
https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/gtkprogressbar.c#L92

The result should be the same in that (A) the min size is now what it is
in GTK+ 3 & (B) an app/user can override the theme exactly the same way.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1192

7 years agoHC: merge dupe selectors; linebreaks for legibility
Daniel Boles [Tue, 3 Jul 2018 17:54:33 +0000 (18:54 +0100)]
HC: merge dupe selectors; linebreaks for legibility

7 years agoMerge branch 'gdk4-dnd-docs' into 'master'
Timm Bäder [Tue, 3 Jul 2018 17:28:44 +0000 (17:28 +0000)]
Merge branch 'gdk4-dnd-docs' into 'master'

docs: Add new DnD types

See merge request GNOME/gtk!227

7 years agoUpdate POTFILES.in
Piotr Drąg [Tue, 3 Jul 2018 15:11:00 +0000 (17:11 +0200)]
Update POTFILES.in

7 years agodocs: Add new DnD types
Ernestas Kulik [Tue, 3 Jul 2018 09:32:41 +0000 (12:32 +0300)]
docs: Add new DnD types

7733f646d6985f2d90e43507b8063719e44288ba renamed GdkDragContext to
GdkDrag, which broke the docs, as a reference to
gdk_drag_context_get_type() still exists. This commit renames the type
accordingly and adds GdkDrop.

7 years agoMerge branch 'dnd-cleanups' into 'master'
Matthias Clasen [Mon, 2 Jul 2018 21:19:45 +0000 (21:19 +0000)]
Merge branch 'dnd-cleanups' into 'master'

Dnd cleanups

See merge request GNOME/gtk!226

7 years agoAdwaita: Drop some unneeded overrides
Daniel Boles [Mon, 2 Jul 2018 20:45:06 +0000 (21:45 +0100)]
Adwaita: Drop some unneeded overrides

The pseudoclasses work fine on the subnodes without having to also apply
`parent:class subnode`.

7 years agoAdwaita: Regenerate CSS for text handle overhaul
Daniel Boles [Mon, 2 Jul 2018 21:04:17 +0000 (22:04 +0100)]
Adwaita: Regenerate CSS for text handle overhaul

Commit b3e91b7111f5b46a9165b03d0fc37080358c93e4 forgot this.

7 years agowin32: Adapt to dnd api changes
Matthias Clasen [Mon, 2 Jul 2018 16:04:51 +0000 (18:04 +0200)]
win32: Adapt to dnd api changes

Follow the GdkDragContext -> GdkDrag change.

7 years agoScrolledWindow: a couple of spelling/grammar fixes
Daniel Boles [Mon, 2 Jul 2018 19:11:12 +0000 (20:11 +0100)]
ScrolledWindow: a couple of spelling/grammar fixes

(A) Put a space in "scrolled window" like the other doc comments
(B) Say "i.e." rather than "ie."
(C) Fix grammar from "makes [...] exactly reaches" to "exactly reach"

7 years agoScrolledWindow: Fix/improve doc of key bindings
Daniel Boles [Mon, 2 Jul 2018 19:09:37 +0000 (20:09 +0100)]
ScrolledWindow: Fix/improve doc of key bindings

Saying 'key + modifiers' is really weird, so reverse that, and explain
why there are 2 cited and what the difference between them is.

7 years agoScrolledWindow: Add missing apostrophes
Daniel Boles [Mon, 2 Jul 2018 19:07:23 +0000 (20:07 +0100)]
ScrolledWindow: Add missing apostrophes

7 years agoMerge branch 'event-controller-key-docs' into 'master'
Matthias Clasen [Mon, 2 Jul 2018 17:16:04 +0000 (17:16 +0000)]
Merge branch 'event-controller-key-docs' into 'master'

eventcontrollerkey: Document key-pressed and key-released

See merge request GNOME/gtk!225

7 years agodnd: Rename headers
Matthias Clasen [Mon, 2 Jul 2018 11:39:09 +0000 (13:39 +0200)]
dnd: Rename headers

Rename gdkdnd.h to gdkdrag.h, to go along with gdkdrop.h

This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.

7 years agodocs: Update dnd section
Matthias Clasen [Mon, 2 Jul 2018 11:35:39 +0000 (13:35 +0200)]
docs: Update dnd section

Add the separate drag and drop apis.

7 years agogdk: Rename GdkDragContext to GdkDrag
Matthias Clasen [Fri, 29 Jun 2018 17:34:14 +0000 (13:34 -0400)]
gdk: Rename GdkDragContext to GdkDrag

This is to go along with the newly introduced GdkDrop.

This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.

7 years agoeventcontrollerkey: Document key-pressed and key-released
Ernestas Kulik [Mon, 2 Jul 2018 09:18:26 +0000 (12:18 +0300)]
eventcontrollerkey: Document key-pressed and key-released

None of the GtkEventControllerKey signals are documented; this commit
adds documentation for a couple of them.

7 years agotestsuite/gtk/defaultvalue: Actually build...& fix
Daniel Boles [Fri, 29 Jun 2018 19:00:06 +0000 (20:00 +0100)]
testsuite/gtk/defaultvalue: Actually build...& fix

It looks like this got dropped during the move from autotools and never
restored. I can see why, since making it work wasn't a hugely fun task!

Notes on some less then obvious details:
 * PlacesSidebar is private now and didn't seem to be to be particularly
   easy to adapt to, so this moves to checking for it by name, not TYPE.
   I couldn't find a (fast) better way; if you know how, please clean up
 * added 2 casts to avoid warnings from the new type-propagating ref()
 * GdkClipboard and GdkContentProvider need some properties dodged
 * GtkToolItemGroup is gone
 * fixed indentation and used TypeName:property-name syntax in a print()

7 years agoMerge branch 'wip/cursor-output-scale-changes' into 'master'
Matthias Clasen [Fri, 29 Jun 2018 15:08:17 +0000 (15:08 +0000)]
Merge branch 'wip/cursor-output-scale-changes' into 'master'

wayland: Update cursor surface scale when output scale changes

See merge request GNOME/gtk!224

7 years agoMerge branch 'wip/aplazas/modelbutton-markup-master' into 'master'
Matthias Clasen [Fri, 29 Jun 2018 14:21:24 +0000 (14:21 +0000)]
Merge branch 'wip/aplazas/modelbutton-markup-master' into 'master'

ModelButton: Add 'use-markup' property

See merge request GNOME/gtk!222

7 years agowayland: Update cursor surface scale when output scale changes
Jonas Ådahl [Thu, 28 Jun 2018 10:44:22 +0000 (12:44 +0200)]
wayland: Update cursor surface scale when output scale changes

Also update the cursor surfaces of every seat when an output changes
scale. This could for example happen when a monitor scale is changed via
Settings.

7 years agowidget: Move opactiy == 0 check
Benjamin Otte [Wed, 27 Jun 2018 18:52:23 +0000 (20:52 +0200)]
widget: Move opactiy == 0 check

If we check it too early, we will not unset priv->draw_neeeded, which
will then cause queue_draw() calls to not have an effect later. And that
causes changes in opacity to not register.

Closes #1180

7 years agonotify test: Remove more nonexistent properties
Daniel Boles [Wed, 27 Jun 2018 16:17:05 +0000 (17:17 +0100)]
notify test: Remove more nonexistent properties

7 years agonotify test: Remove some non-existant properties
Timm Bäder [Wed, 27 Jun 2018 16:02:35 +0000 (18:02 +0200)]
notify test: Remove some non-existant properties

7 years agotestsuite: Remove a GtkColorButton special case
Timm Bäder [Wed, 27 Jun 2018 15:58:01 +0000 (17:58 +0200)]
testsuite: Remove a GtkColorButton special case

The comment above explains neatly why subclassing GtkButton for
GtkColorButton was a bad idea. Nowadays it's a GtkWidget subclass
containing a GtkButton so let's remove the special case here.

7 years agoRemove some GtkRecentChooserMenu references
Timm Bäder [Wed, 27 Jun 2018 15:57:31 +0000 (17:57 +0200)]
Remove some GtkRecentChooserMenu references

Doesn't exist anymore.

7 years agoModelButton: Add 'use-markup' property
Adrien Plazas [Mon, 23 Apr 2018 09:06:17 +0000 (11:06 +0200)]
ModelButton: Add 'use-markup' property

Binds this property to the button's label, allowing a model button to
have text with markup.

This will be convenient for buttons like 'Online Accounts <sup>↗</sup>'.

7 years agogdk: Fix some g-i annotations warnings
Rico Tzschichholz [Wed, 27 Jun 2018 07:00:17 +0000 (09:00 +0200)]
gdk: Fix some g-i annotations warnings

7 years agogl renderer: Ignore 0-sized fallback nodes
Timm Bäder [Tue, 26 Jun 2018 19:40:59 +0000 (21:40 +0200)]
gl renderer: Ignore 0-sized fallback nodes

7 years agoDo not modify a const GdkEvent in place
Emmanuele Bassi [Tue, 26 Jun 2018 16:57:29 +0000 (17:57 +0100)]
Do not modify a const GdkEvent in place

When deciding whether or not to emulate a press event, we're translating
the last event coordinates and mutating the given event structure
unconditionally.

We should modify the newly created GdkEvent copy, since it's what we're
going to use when emitting the press event.

This avoids mutating a constant GdkEvent and global state, and also
avoids a compiler warning.

7 years agoDocs: Remove more since markers
Matthias Clasen [Tue, 26 Jun 2018 16:31:41 +0000 (12:31 -0400)]
Docs: Remove more since markers

The idea is that GTK+ 4 will be an epoch, API-wise.
Everything that was around for 4.0 has been there
since the beginning of the epoch and doesn't need
markers.

7 years agodocs: Document GtkEventControllerKey
Matthias Clasen [Tue, 26 Jun 2018 16:19:00 +0000 (12:19 -0400)]
docs: Document GtkEventControllerKey

The long description was missing.

7 years agoBump version to 3.94.0
Matthias Clasen [Mon, 25 Jun 2018 22:14:16 +0000 (18:14 -0400)]
Bump version to 3.94.0

7 years agoRemove a lot of Since annotations
Matthias Clasen [Mon, 25 Jun 2018 23:21:08 +0000 (19:21 -0400)]
Remove a lot of Since annotations

4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.

7 years agoSome updates
Matthias Clasen [Mon, 25 Jun 2018 22:13:52 +0000 (18:13 -0400)]
Some updates

7 years agoreftests: Fix compilation
Benjamin Otte [Mon, 25 Jun 2018 22:53:39 +0000 (00:53 +0200)]
reftests: Fix compilation

FOREIGN surfaces are gone.

7 years agogdk: Remove GDK_SURFACE_FOREIGN
Benjamin Otte [Mon, 25 Jun 2018 22:47:40 +0000 (00:47 +0200)]
gdk: Remove GDK_SURFACE_FOREIGN

We don't create surfaces of that type anymore.

7 years agoimwayland: Fix a small leak
Michael Catanzaro [Sun, 24 Jun 2018 20:49:46 +0000 (15:49 -0500)]
imwayland: Fix a small leak

If the parent get_preedit_string implementation returns a nonnull
zero-length string, then we ignore it, which is almost fine. We have to
free it, though.

Fixes #1174

7 years agoMerge branch 'master' into 'master'
Matthias Clasen [Sat, 23 Jun 2018 19:42:26 +0000 (19:42 +0000)]
Merge branch 'master' into 'master'

gtk: also recolor circle and ellipse in symbolic SVG icons.

See merge request GNOME/gtk!214

7 years agogtk: also recolor circle and ellipse in symbolic SVG icons.
Jehan [Fri, 22 Jun 2018 22:16:39 +0000 (00:16 +0200)]
gtk: also recolor circle and ellipse in symbolic SVG icons.

7 years agobutton: Remove unused variable
Timm Bäder [Thu, 21 Jun 2018 18:57:18 +0000 (20:57 +0200)]
button: Remove unused variable

7 years agoscrolledwindow: Avoid a queue_resize path in size-allocate
Timm Bäder [Thu, 21 Jun 2018 15:43:26 +0000 (17:43 +0200)]
scrolledwindow: Avoid a queue_resize path in size-allocate

7 years agogtktreeviewcolumn: Implement column dragging through GtkGestureDrag
Carlos Garnacho [Tue, 12 Jun 2018 11:56:28 +0000 (13:56 +0200)]
gtktreeviewcolumn: Implement column dragging through GtkGestureDrag

And remove ::event signal handler.

7 years agogtktexthandle: Update to gtk4 rendering/input
Carlos Garnacho [Tue, 12 Jun 2018 10:33:03 +0000 (12:33 +0200)]
gtktexthandle: Update to gtk4 rendering/input

GtkTextHandle was neglected by whoever removed the ::draw signal,
leaving it entirely broken. Update to using GtkGizmo so we can
implement snapshot of text handles.

Input has received a revamp too, handling is done through a
GtkGestureDrag and coordinate calculations simplified by storing
the delta to the hotspot on ::begin instead of ::update, as this
value is constant throughout the gesture. Widget state management
on crossing events happens implicitly, so no longer needs to be
done here.

Last but not least, CSS has also been updated so handles are
rendered at the correct size and proportion, and with the padding
that code expects of it.

7 years agogtkwindow: Queue popover resize on set_popover_position()
Carlos Garnacho [Tue, 12 Jun 2018 10:30:17 +0000 (12:30 +0200)]
gtkwindow: Queue popover resize on set_popover_position()

So the new position is eventually honored. Fixes magnifier and handles
staying in place after being shown.

7 years agogtkfilechooserwidget: Forward events to filechooser through key controller
Carlos Garnacho [Fri, 8 Jun 2018 17:05:28 +0000 (19:05 +0200)]
gtkfilechooserwidget: Forward events to filechooser through key controller

Instead of manually calling gtk_binding_set_activate_event() on an ::event
callback in the save entry.

7 years agogtkfilechoooserentry: Handle tab completion through key controller
Carlos Garnacho [Fri, 8 Jun 2018 12:33:35 +0000 (14:33 +0200)]
gtkfilechoooserentry: Handle tab completion through key controller

7 years agogtkemojicompletion: Use GtkEntry key controller to handle key presses
Carlos Garnacho [Fri, 8 Jun 2018 11:50:26 +0000 (13:50 +0200)]
gtkemojicompletion: Use GtkEntry key controller to handle key presses

7 years agogtkentrycompletion: Properly remove controller from entry
Carlos Garnacho [Fri, 8 Jun 2018 11:31:32 +0000 (13:31 +0200)]
gtkentrycompletion: Properly remove controller from entry

When disconnecting the GtkEntry from the GtkEntryCompletion, we
must remove the controller in order to avoid dangling callbacks.

7 years agogtkentrycompletion: Move focus out handling to key controller
Carlos Garnacho [Fri, 8 Jun 2018 11:26:26 +0000 (13:26 +0200)]
gtkentrycompletion: Move focus out handling to key controller

We can use the already present key controller to handle focus out.

7 years agogtkentrycompletion: Perform event handling on popup through controllers
Carlos Garnacho [Fri, 8 Jun 2018 11:18:34 +0000 (13:18 +0200)]
gtkentrycompletion: Perform event handling on popup through controllers

Instead of a ::event signal handler.

7 years agogtkplacessidebar: Replace ::event signal handlers with gestures
Carlos Garnacho [Fri, 8 Jun 2018 09:29:59 +0000 (11:29 +0200)]
gtkplacessidebar: Replace ::event signal handlers with gestures

Set up a gesture on the sidebar rows to detect pointer clicks on
it. The row DnD management has been moved to the row widget itself,
it makes more sense even if the drag is began from the sidebar widget.

7 years agogtkwindow: Move map/delete/configure event management to gtkmain
Carlos Garnacho [Thu, 7 Jun 2018 14:47:44 +0000 (16:47 +0200)]
gtkwindow: Move map/delete/configure event management to gtkmain

Toplevels are about the only widgets interested in these events,
just handle those without going through the capture/bubble handling
code.

7 years agogtkwindow: Simplify WM drag/resize handling
Carlos Garnacho [Thu, 7 Jun 2018 14:25:34 +0000 (16:25 +0200)]
gtkwindow: Simplify WM drag/resize handling

We still need a drag gesture both on front (capture) and back (bubble)
to handle dragging from both the GtkWindow widget and chrome in the
headerbar. But we can do it through 2 drag gestures, instead of special
event handling code.

7 years agogtkmenushell: Port to GtkGesture
Carlos Garnacho [Thu, 7 Jun 2018 13:32:47 +0000 (15:32 +0200)]
gtkmenushell: Port to GtkGesture

We still need to poke the current event at places, but this is
better than the ::event vfunc.

7 years agogtkpopover: Fix key navigation
Carlos Garnacho [Thu, 7 Jun 2018 12:09:01 +0000 (14:09 +0200)]
gtkpopover: Fix key navigation

This has been broken since we switched key event delivery to follow
the same semantics than pointer/touch. There, GTK+ grabs will influence
the topmost widget during event delivery, rendering the toplevel
unable to handle key navigation. The toplevel must handle those key
events in an explicit manner then.

We don't render the keyboard focus rectangle yet, but I assume that's
something else.

7 years agogtkpopover: Port to GtkEventController/GtkGesture
Carlos Garnacho [Thu, 7 Jun 2018 11:32:31 +0000 (13:32 +0200)]
gtkpopover: Port to GtkEventController/GtkGesture

Use GtkEventControllerKey and GtkGestureMultiPress to replace key/button
event handling.

7 years agogtkwindow: Handle focus in/out through key controller
Carlos Garnacho [Wed, 6 Jun 2018 23:23:59 +0000 (01:23 +0200)]
gtkwindow: Handle focus in/out through key controller

One less use of ::event in this widget, now mostly left to
map/delete/configure, those puny events.

7 years agogtkspinbutton: Use GtkEventControllerKey
Carlos Garnacho [Wed, 6 Jun 2018 23:09:05 +0000 (01:09 +0200)]
gtkspinbutton: Use GtkEventControllerKey

And drop the ::event vfunc implementation with it.

7 years agogtkfontchooser: Use GtkEventControllerKey
Carlos Garnacho [Wed, 6 Jun 2018 22:49:04 +0000 (00:49 +0200)]
gtkfontchooser: Use GtkEventControllerKey

Use an event controller on GtkFontChooserDialog, a nice side effect
is that we can use gtk_event_controller_key_forward() and
gtk_search_entry_set_key_capture_widget() instead of passing events
around for dialog search.

7 years agogtkfilechooserwidget: Drop usage of ::event vmethod
Carlos Garnacho [Wed, 6 Jun 2018 15:27:22 +0000 (17:27 +0200)]
gtkfilechooserwidget: Drop usage of ::event vmethod

Use a key controller set up in the UI file instead.

7 years agogtkfilechooserentry: Use GtkEntry key controller for focus-out handling
Carlos Garnacho [Wed, 6 Jun 2018 13:57:22 +0000 (15:57 +0200)]
gtkfilechooserentry: Use GtkEntry key controller for focus-out handling

Expose the GtkEntry key controller in private API, so we don't have to
create yet another one just to handle focus-out.

7 years agogtkentry: Use gestures for entry icons
Carlos Garnacho [Wed, 6 Jun 2018 11:52:08 +0000 (13:52 +0200)]
gtkentry: Use gestures for entry icons

Instead of doing all handling manually in the ::event vfunc,
set up drag/multipress gestures on icon images, and implement
emission of ::icon-press/release and DnD there.

As a side effect, the GdkEvent field in ::icon-press/release
signals has been dropped. Callers that might be interested on it
may still use gtk_get_current_event*().

7 years agogtkbutton: remove keyboard device GTK+ grab
Carlos Garnacho [Tue, 5 Jun 2018 13:57:53 +0000 (15:57 +0200)]
gtkbutton: remove keyboard device GTK+ grab

This isn't really necessary, if keyboard focus forcibly goes somewhere
else we will get ::grab-notify, which is sufficient to deactivate the
button again.

7 years agogtkbutton: Use key controller for button (de)activation through keybindings
Carlos Garnacho [Tue, 5 Jun 2018 12:34:36 +0000 (14:34 +0200)]
gtkbutton: Use key controller for button (de)activation through keybindings

And stop using GtkWidget::event for good.

7 years agox11: Fix dnd action handling
Matthias Clasen [Wed, 20 Jun 2018 22:06:35 +0000 (18:06 -0400)]
x11: Fix dnd action handling

We were mistakenly assigning an Atom to a flags value.

7 years agoEmojiCompletion: Avoid another un/signed warning
Daniel Boles [Wed, 20 Jun 2018 19:51:50 +0000 (20:51 +0100)]
EmojiCompletion: Avoid another un/signed warning

The cherry-pick missed this, I guess.

7 years agoEmojiCompletion: Avoid un/signed compare warnings
Daniel Boles [Wed, 20 Jun 2018 19:36:19 +0000 (20:36 +0100)]
EmojiCompletion: Avoid un/signed compare warnings

(A) Use gsize to match the result of g_variant_n_children
(B) Use guint for n_matches, like the struct (and all other n_matches)

7 years agothemes: Remove leftover bit of .linked workaround
Daniel Boles [Wed, 20 Jun 2018 19:11:26 +0000 (20:11 +0100)]
themes: Remove leftover bit of .linked workaround

Now that .linked acts like the .path-bar already did, there is no point
in applying the same styles again (with higher specificity).

7 years agocontainer: Remove SPECIAL_CONTAINER hack
Timm Bäder [Wed, 20 Jun 2018 18:42:01 +0000 (20:42 +0200)]
container: Remove SPECIAL_CONTAINER hack

As discussed in !129

Closes !129

7 years agostackswitcher: Remove icon-size property
Timm Bäder [Wed, 20 Jun 2018 18:22:52 +0000 (20:22 +0200)]
stackswitcher: Remove icon-size property

This ought to be controlled via css these days.

7 years agoinfobar: Remove priv pointer
Timm Bäder [Wed, 20 Jun 2018 18:05:06 +0000 (20:05 +0200)]
infobar: Remove priv pointer